home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / CSMP Digests / csmp-v1-023.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  70.0 KB  |  1,949 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Fri, 20 Mar 92       Volume 1 : Issue 23
  2.  
  3. Today's Topics:
  4.  
  5.     Mac Pascal vs. C
  6.  
  7.  
  8. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  9.  
  10. These digests are available (by using FTP, account anonymous, your email
  11. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  12. edu (try skinner.cs.uoregon.edu if that doesn't work).  This is also the home
  13. of the comp.sys.mac.programmer Frequently Asked Questions list.
  14.  
  15. These digests are also available via email.  Just send a note saying that you
  16. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  17. automatically receive each new digest as it is created.
  18.  
  19. The articles in these digests are taken directly from comp.sys.mac.programmer.
  20. They are not edited; all articles included in this digest are in their original
  21. posted form.  The only articles that are -not- included in these digests are
  22. those which didn't receive any replies (except those that give information
  23. rather than ask a question).  All replies to each article are concatenated
  24. onto the original article in the order in which they were received.  Article
  25. threads are not added to the digests until the last article added to the
  26. thread is at least one month old (this is to ensure that the thread is dead
  27. before adding it to the digests).
  28.  
  29. Send administrative mail to mkelly@cs.uoregon.edu.
  30.  
  31. -------------------------------------------------------
  32.  
  33. From: rdixon@gemini.cs.nps.navy.mil (robert dixon)
  34. Subject: Mac Pascal vs. C
  35. Date: 31 Jan 92 18:09:02 GMT
  36. Organization: Naval Postgraduate School, Monterey CA
  37.  
  38. In article <kdW=1ia00WCSMk6Mky@andrew.cmu.edu> re00+@andrew.cmu.edu (Robert H Earhart) writes:
  39. >
  40. >  So write in Pascal... it's easier than C...
  41. >
  42. >  -Rob
  43.  
  44.   Language wars are always so messy . . .
  45.  
  46.   Like I said in my original posting, my programming background is in
  47. the PC world, and I've programmed in both Turbo Pascal and Turbo C++.
  48. I don't know much about Macintosh Pascal compilers vs. Macintosh C
  49. compilers, but I find C a little easier for a couple of reasons.
  50. First, it's designed as a more low-level language, so it's a little
  51. easier to access operating system features that the language library
  52. designer didn't think was "important". On the PC I've had to write
  53. assembler subroutines for Turbo Pascal that did simple things like
  54. deleting files and subdirectories.  It's much easier to do things like
  55. that in C, because C was designed to support separately compiled code.
  56.  
  57.   C's notation for some things is a little more compact, although that
  58. can certainly lead to cryptic code.
  59.  
  60.   I like Pascal quite a bit. I just personally find C easier.
  61.  
  62.   At the risk of starting a fight, do people find Macintosh Pascal to
  63. be just as easy and efficient as Macintosh C?
  64.  
  65. Bob Dixon
  66.  
  67.  
  68.  
  69. - -------------------------
  70.  
  71. From: re00+@andrew.cmu.edu (Robert H Earhart)
  72. Subject:  Mac Pascal vs. C
  73. Date: 1 Feb 92 17:21:31 GMT
  74. Organization: Freshman, MCS general, Carnegie Mellon, Pittsburgh, PA
  75.  
  76.  
  77.   No need for a fight... on the PC, C is DEFINITLY the way to go,
  78. along with the Turbo compiler... on Unix, C's also wonderful. On the
  79. Mac though...
  80.  
  81.   1. Inside Macintosh was written in Pascal.
  82.   2. Pascal forces you to declare EVERYTHING, encouraging good
  83. programming vs. hacks (though you can hack in either...)
  84.   3. Think's Pascal compiler is so great, it's hard to think of an
  85. equal. It's the reason I program on Macs, rather than Dec stations.
  86. The C compilers I've seen aren't nearly as integrated, and are
  87. generally poorer. The only thing C has in its favor is it's 'for'
  88. loops, and Pascal makes up for that with sets...
  89.  
  90.   But in the end, it's all personal preference... use what you like!
  91. Libraries can be used by almost anything... :)
  92.  
  93.   -Rob
  94.  
  95.  
  96.  
  97. - -------------------------
  98.  
  99. From: pete@medea.rice.edu (Louis Wu)
  100. Subject:  Mac Pascal vs. C
  101. Date: 1 Feb 92 18:41:52 GMT
  102. Organization: Whatsamatta U
  103.  
  104.  
  105. I couldn't let this pass.
  106.  
  107. >   No need for a fight... on the PC, C is DEFINITLY the way to go,
  108. > along with the Turbo compiler... on Unix, C's also wonderful. On the
  109. > Mac though...
  110. >   1. Inside Macintosh was written in Pascal.
  111. So what. Any pascal var parameter is a pointer in C. It's *very*
  112. straightforward to call pascal routine routines from C.
  113.  
  114. >   2. Pascal forces you to declare EVERYTHING, encouraging good
  115. > programming vs. hacks (though you can hack in either...)
  116. Key word being 'force'. C allows you to declare prototypes if you want.
  117. Think C will force you to cast all pointers if you want. Or you don't have
  118. to, if you don't want. I don't like to be forced to do anything "for my own 
  119. good". 
  120.  
  121. >   3. Think's Pascal compiler is so great, it's hard to think of an
  122. > equal. It's the reason I program on Macs, rather than Dec stations.
  123. > The C compilers I've seen aren't nearly as integrated, and are
  124. > generally poorer. The only thing C has in its favor is it's 'for'
  125. > loops, and Pascal makes up for that with sets...
  126. Arrgh. You say the Think Pascal compiler is so good, ever looked at Think's
  127. C compiler? Strangely enough, they are similar...
  128.  
  129. Pascal is for beginners, C is for real programmers, and assembly is for
  130. masochists. Surely nothing could be more clear.
  131.  
  132. :-)
  133. --
  134. =============================================================================
  135. Pete Keleher   "Relax! Don't worry! Have a homebrew!"        pete@cs.rice.edu
  136. =============================================================================
  137.  
  138.  
  139.  
  140. - -------------------------
  141.  
  142. From: rdixon@taurus.cs.nps.navy.mil (robert dixon)
  143. Subject:  Mac Pascal vs. C
  144. Date: 1 Feb 92 20:47:15 GMT
  145. Organization: Naval Postgraduate School, Monterey CA
  146.  
  147. In article <IdWhQPa00WCSQE29lG@andrew.cmu.edu> re00+@andrew.cmu.edu (Robert H Earhart) writes:
  148. >
  149. >  No need for a fight... on the PC, C is DEFINITLY the way to go,
  150. >along with the Turbo compiler... on Unix, C's also wonderful. On the
  151. >Mac though...
  152. >
  153. >  3. Think's Pascal compiler is so great, it's hard to think of an
  154. >equal. It's the reason I program on Macs, rather than Dec stations.
  155.  
  156.   Does Think Pascal support anything resembling object orientation?
  157. How about separately compiled code, i.e. linking in other code you
  158. wrote and compiled before?
  159.  
  160. - -------------------------------------------------------------------
  161. Bob Dixon
  162. rdixon@cs.nps.navy.mil              "My opinions may not necessarily
  163. Low-Life Grad Student,              be my own . . ."
  164. Naval Postgraduate School,
  165. Monterey, CA
  166. - ---------------------------------------------------------------------
  167.  
  168.  
  169.  
  170. - -------------------------
  171.  
  172. From: rdixon@taurus.cs.nps.navy.mil (robert dixon)
  173. Subject:  Mac Pascal vs. C
  174. Date: 1 Feb 92 20:53:12 GMT
  175. Organization: Naval Postgraduate School, Monterey CA
  176.  
  177. In article <PETE.92Feb1124152@medea.rice.edu> pete@medea.rice.edu (Louis Wu) writes:
  178. >
  179. >I couldn't let this pass.
  180. >>> 
  181. >Arrgh. You say the Think Pascal compiler is so good, ever looked at Think's
  182. >C compiler? Strangely enough, they are similar...
  183. >
  184. >Pascal is for beginners, C is for real programmers, and assembly is for
  185. >masochists. Surely nothing could be more clear.
  186. >
  187. >:-)
  188. >--
  189.  
  190.   See, I said this question would start a fight.
  191.  
  192.   How "object-oriented" is Think C?  Does it support classes?
  193. Inheritance?  Function name overloading?  Public and private variables
  194. and functions?  How about reference variables?
  195.  
  196.   
  197. - -------------------------------------------------------------------
  198. Bob Dixon                          "My opinions may not necessarily
  199. Low-Life Grad Student,              be my own . . ."
  200. Naval Postgraduate School,
  201. Monterey, CA
  202. - ---------------------------------------------------------------------
  203.  
  204.  
  205.  
  206. - -------------------------
  207.  
  208. From: re00+@andrew.cmu.edu (Robert H Earhart)
  209. Subject:  Mac Pascal vs. C
  210. Date: 2 Feb 92 07:27:02 GMT
  211. Organization: Freshman, MCS general, Carnegie Mellon, Pittsburgh, PA
  212.  
  213. pete@medea.rice.edu (Louis Wu) writes:
  214. > Arrgh. You say the Think Pascal compiler is so good, ever looked at Think's
  215. > C compiler? Strangely enough, they are similar...
  216.  
  217.   As a matter of fact... I'm fairly fluent in both. The Pascal one is
  218. nicer... :)
  219.  
  220. > Pascal is for beginners, C is for real programmers, and assembly is for
  221. > masochists. Surely nothing could be more clear.
  222.  
  223.   Hey! I resent that! Pascal is NOT a beginner language in and of
  224. itself... it's all in the skill of the programmer...
  225.  
  226.   Pascal supports OOP very well... It's actually quite useful (Again,
  227. I speak of Think's Pascal: the Pascal standard is a hose...)
  228.  
  229.   Seperately compiled code... it'll make libraries, and accept
  230. libraries from Think C, MPW, and a few others... you can also use
  231. units, if you prefer... and because of Pascal's "Declare it before you
  232. use it" rule, you don't wind up having the compiler just sort of
  233. trusting the linker to get everything straight in the end...  and
  234. because of the scope rules, you know EXACTLY what things are being
  235. shared by what units at all times...
  236.  
  237.   So not only CAN you re-use old code, but it makes it a lot EASIER to
  238. reuse old code, as well as making it easier to split your program up
  239. into units and still have it compile properly...
  240.  
  241.   And this ISN'T a fight; I think we're all capable of discussing the
  242. merits of various languages w/o taking things personally... for
  243. example, I wouldn't dream of programming a UNIX machine with anything
  244. BUT C...
  245.  
  246.   That's what the smiley's are for. :)
  247.  
  248. > :-)
  249.  
  250.   :)
  251.  
  252.   -Rob
  253.  
  254.  
  255.  
  256. - -------------------------
  257.  
  258. From: frain@cis.ksu.edu (Jerry Frain)
  259. Subject:  Mac Pascal vs. C
  260. Date: 3 Feb 92 08:16:28 GMT
  261. Organization: Kansas State University
  262.  
  263. re00+@andrew.cmu.edu (Robert H Earhart) writes:
  264.  
  265. >On the Mac
  266.  
  267. >  1. Inside Macintosh was written in Pascal.
  268.  
  269. This does make programming in C somewhat of a pain for programmers
  270. just becoming familiar with the Mac.  It is not hard to transfer from
  271. Pascal to C and vice-versa once you get used to it, but I it can be a
  272. little confusing at first (of course if Apple would've been on the
  273. ball the first time 'round, they would've used C instead of Pascal ;-) )
  274.  
  275. >  2. Pascal forces you to declare EVERYTHING
  276.  
  277. Big deal.  So does C -- just try to compile a program where you've not
  278. declared a variable or function at all.  The linker'll catch ya.
  279.  
  280. Now, if you mean that Pascal doesn't allow forward referencing, while
  281. C allows prototyping or declares a function to return int, well,
  282. that's a product of the fact that both compilers want to do everything
  283. in one pass, they just solve declarations problem differently.
  284.  
  285. C gives the programmer choice, while Pascal rigidly enforces Wirth's
  286. choice.
  287.  
  288. >encouraging good programming vs. hacks (though you can hack in either...)
  289.  
  290. Good programming is where you find it.  Most of the Pascal code out
  291. there is "prettier" (indention, etc) than most C code out there, but
  292. I'd have to say that a lot of the ugly C code out there is written
  293. by converted Pascal programmers who is can't figure out "where those
  294. darn curly braces go".
  295.  
  296. >  3. Think's Pascal compiler is so great, it's hard to think of an
  297. >equal. It's the reason I program on Macs, rather than Dec stations.
  298.  
  299. Just because a particular compiler is appealing is hardly a reason to
  300. use a language.  I bet if I came up with a nifty COBOL compiler for
  301. the Mac there wouldn't be too many Pascal or C converts.
  302.  
  303. If you like nice environments to program under try Emacs and C on a
  304. Unix system.  Now, there's an unbeatable combination.
  305.  
  306. >The C compilers I've seen aren't nearly as integrated,
  307.  
  308. Funny, I always thought of "integrated" compilers as Evil.  After all,
  309. I'd rather use my favorite editor, assembler, make facility, and
  310. debugger, than have to rely on one package to provide the best of all
  311. of those things (and they never do).
  312.  
  313. >The only thing C has in its favor is it's 'for' loops, and Pascal
  314. >makes up for that with sets...
  315.  
  316. C is standardized.
  317.  
  318. C has a preprocessor.
  319.  
  320. C has a more standard OOP extension (C++, objective C stinks).
  321.  
  322. >  But in the end, it's all personal preference... use what you like!
  323.  
  324. I think that if you have a good, consistent coding style, and follow a
  325. good convention for variable naming, C is much cleaner and more concise
  326. to read than Pascal.
  327.  
  328. Just MHO, of course.
  329.  
  330. - ----------------------------------------------------------------------------
  331. Jerry Frain, Systems Programmer         |  "Back off man, I'm a scientist."
  332. Kansas State University                 |  frain@cis.ksu.edu
  333. Department of Computer & Info Sciences  |  ...!rutgers!depot!frain
  334.  
  335.  
  336.  
  337. - -------------------------
  338.  
  339. From: greeny@top.cis.syr.edu (Jonathan Greenfield)
  340. Subject:  Mac Pascal vs. C
  341. Date: 3 Feb 92 15:40:41 GMT
  342. Organization: CIS Dept., Syracuse University
  343.  
  344. In article <frain.697106821@depot.cis.ksu.edu> frain@cis.ksu.edu (Jerry Frain) writes:
  345.  
  346. >C has a more standard OOP extension (C++, objective C stinks).
  347.  
  348. Close.  ALL versions of C stink.
  349.  
  350.  
  351.  
  352. Oh well.  I guess I probably just started a flame war...
  353.  
  354. --
  355. greeny                                           greeny@top.cis.syr.edu
  356.  
  357. "What's the difference between an orange?"
  358.  
  359.  
  360.  
  361. - -------------------------
  362.  
  363. From: ericd@CATICSUF.CSUFRESNO.EDU (Eric W. Douglas)
  364. Subject:  Mac Pascal vs. C
  365. Date: 3 Feb 92 05:38:07 GMT
  366.  
  367.  
  368. re00+@andrew.cmu.edu (Robert H Earhart) writes:
  369.  
  370. >pete@medea.rice.edu (Louis Wu) writes:
  371. >> Arrgh. You say the Think Pascal compiler is so good, ever looked at Think's
  372. >> C compiler? Strangely enough, they are similar...
  373.  
  374. >  As a matter of fact... I'm fairly fluent in both. The Pascal one is
  375. >nicer... :)
  376.  
  377. >> Pascal is for beginners, C is for real programmers, and assembly is for
  378. >> masochists. Surely nothing could be more clear.
  379.  
  380. >  Hey! I resent that! Pascal is NOT a beginner language in and of
  381. >itself... it's all in the skill of the programmer...
  382.  
  383. [ rest deleted ]
  384.  
  385. Why is it, time and time again, I hear this discussion? Are there really
  386. that many people out there with this much time on their hands, to sit around
  387. and bicker about what semantics make any language better than another?
  388.  
  389. Look, on the Mac, Pascal, C, same difference to me... I've used both. Don't
  390. ask me why, but I *like* Pascal better on the Mac, just like I *like* C 
  391. better under Unix. If we got into real issues, like how the machine code
  392. compares from compiler to compiler, that would be a refreshing change. From
  393. my observations, both THINK C and THINK Pascal produce very tight code. Others
  394. argue about C's pointer indexing, which is something I've never had a problem
  395. with in Pascal with proper type implementations. Then again, there's 
  396. portability, but hey, if you're developing software in C on the Mac, I 
  397. think it would be fair to say that you're not going to port anything to
  398. another platform very easily.
  399.  
  400. And to however wrote the assembly remark: I like assembly for specific
  401. tasks, and no, I don't like whips in, well, shall we say other facets
  402. of my life :).
  403.  
  404. --eric
  405.  
  406. * | Eric W. Douglas             Technojock               +1 209 897 5785 | *
  407. * | I'net: ericd@caticsuf.csufresno.edu      ericd@csufres.csufresno.edu | *
  408. * | AppleLink: STUDIO.D      Compuserve: 76170,1472       AOL: EWDOUGLAS | *
  409. ____________________________________________________________________________
  410.  
  411.  
  412.  
  413. - -------------------------
  414.  
  415. From: sandy@beeker.cs.umass.edu (& Wise)
  416. Subject:  Mac Pascal vs. C
  417. Date: 3 Feb 92 16:46:06 GMT
  418. Organization: Organization?  I thought entropy would take care of that...
  419.  
  420. In article <4042@se7.cs.nps.navy.mil> rdixon@taurus.cs.nps.navy.mil (robert dixon) writes:
  421.  
  422.      See, I said this question would start a fight.
  423.  
  424. Always does... 
  425.  
  426.      How "object-oriented" is Think C?   Does it support classes?
  427.  
  428. THINK C has some OO features, they are basically the same ones that
  429. THINK Pascal has (which are the Apple Object Pascal extensions), only
  430. an effort has been made to make the syntax C++ compatible.
  431.  
  432.    Inheritance?  
  433.  
  434. Yes. Single threaded.
  435.  
  436.    Function name overloading?
  437.  
  438. No.
  439.  
  440.    Public and private variables and functions?
  441.  
  442. No.
  443.  
  444.    How about reference variables?
  445.  
  446. Sorry.
  447.  
  448. It should be noted however, that there are a couple of C++ compilers
  449. for the Mac.  Apple has an Cfront (2.1?) derived compiler for MPW, and
  450. Zortech (now part of Symantec) is also available.  Neither are cheap
  451. however...
  452.  
  453.         /s
  454. --
  455. Alexander Erskine Wise /\/\/\/\/\/\/\/\/\/\/\/\ Software Development Laboratory
  456. /\/\/\/\/\/\/\/\/\/\/\/\/\/\ WISE@CS.UMASS.EDU /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  457. \/\/\ This situation calls for large amounts of unadulterated CHOCOLATE! /\/\/\
  458.  
  459.  
  460.  
  461. - -------------------------
  462.  
  463. From: sandy@beeker.cs.umass.edu (& Wise)
  464. Subject:  Mac Pascal vs. C
  465. Date: 3 Feb 92 16:51:19 GMT
  466. Organization: Organization?  I thought entropy would take care of that...
  467.  
  468. In article <4041@se7.cs.nps.navy.mil> rdixon@taurus.cs.nps.navy.mil (robert dixon) writes:
  469.  
  470.      Does Think Pascal support anything resembling object orientation?
  471.  
  472. Hey, I'll answer in this thread too!!
  473.  
  474. Yes.  THINK Pascal implements Apple's "Object Pascal." 
  475.  
  476.    How about separately compiled code, i.e. linking in other code you
  477.    wrote and compiled before?
  478.  
  479. Yes.  Object Pascal includes the UCSD unit construct, and you can
  480. compile into libraries.  There are a few pragmas (embedded compiler
  481. directives) you have to include in the unit specification to use a
  482. library...
  483.  
  484.         /s
  485. --
  486. Alexander Erskine Wise /\/\/\/\/\/\/\/\/\/\/\/\ Software Development Laboratory
  487. /\/\/\/\/\/\/\/\/\/\/\/\/\/\ WISE@CS.UMASS.EDU /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  488. \/\/\ This situation calls for large amounts of unadulterated CHOCOLATE! /\/\/\
  489.  
  490.  
  491.  
  492. - -------------------------
  493.  
  494. From: Douglas.Hill@f438.n109.z1.FidoNet.Org (Douglas Hill)
  495. Subject:  Mac Pascal vs. C
  496. Date: 3 Feb 92 19:42:34 GMT
  497.  
  498. >C has a more standard OOP extension (C++, objective C stinks).
  499.  
  500.  JG> Close.  ALL versions of C stink.
  501.  JG> Oh well.  I guess I probably just started a flame war...
  502.  
  503. Well, you're right, you probably just did.  Why post it at all?  We've
  504. all seen/read enough flames about C and Pascal in this and other groups.
  505. Since this debate between C and Pascal is virtually unending can we move
  506. on to more interesting programming topics?
  507.  
  508. Here's one:  Has anyone heard about MacApp's support for AppleEvents?
  509. Specifically I heard recently that MacApp won't be supporting the
  510. Object Support Library.  Why?  I wonder if something else better is in
  511. the works?
  512.  
  513. Has anyone started using Frontier yet?  I heard that it shipped at MacWorld
  514. in S.F.  I haven't heard much feedback from people who were writing
  515. scripts with it.  (My guess is the lack of apps that are currently AE
  516. driven.)
  517.  
  518. - Doug
  519.   douglas_hill@f438.n109.z1.fidonet.org
  520.   doug@beerwolf.umbc.edu
  521.  
  522.  
  523.  
  524.  * Origin: Europa BBS (301) 718-4690 HST/DS (1:109/438)
  525.  
  526.  
  527.  
  528. - -------------------------
  529.  
  530. From: omh@cs.brown.edu (Owen M. Hartnett)
  531. Subject:  Mac Pascal vs. C
  532. Date: 4 Feb 92 01:59:11 GMT
  533. Organization: Brown University Department of Computer Science
  534.  
  535. This item should be added to the FAQ list right after "Is or is not
  536. the Mac a True Multi-tasking machine?"
  537.  
  538. -Owen
  539. ZZ
  540. Owen Hartnett                omh@cs.brown.edu
  541. "FAITH, n. Belief without evidence in what is told by one who speaks
  542.         without knowledge, of things without parallel."
  543.             -Ambrose Bierce - The Devil's Dictionary
  544.  
  545.  
  546.  
  547. - -------------------------
  548.  
  549. From: rufus@cis.umassd.edu (Rui N Campos)
  550. Subject:  Mac Pascal vs. C
  551. Date: 4 Feb 92 01:43:52 GMT
  552. Organization: University of Massachusetts Dartmouth
  553.  
  554. In <4041@se7.cs.nps.navy.mil> rdixon@taurus.cs.nps.navy.mil (robert dixon) writes:
  555.  
  556. >In article <IdWhQPa00WCSQE29lG@andrew.cmu.edu> re00+@andrew.cmu.edu (Robert H Earhart) writes:
  557. >>
  558. >>  No need for a fight... on the PC, C is DEFINITLY the way to go,
  559. >>along with the Turbo compiler... on Unix, C's also wonderful. On the
  560. >>Mac though...
  561. >>
  562. >>  3. Think's Pascal compiler is so great, it's hard to think of an
  563. >>equal. It's the reason I program on Macs, rather than Dec stations.
  564.  
  565. >  Does Think Pascal support anything resembling object orientation?
  566. >How about separately compiled code, i.e. linking in other code you
  567. >wrote and compiled before?
  568.  
  569. Yes it does.  It even works with MacApp quite well.
  570.  
  571. One thin gwe shouldn't forget is that the Mac operating system was originaly
  572. written in pascal.  so the versions of Pascal that are available for the Mac
  573. are quite high powered.  As a matter of fact I remember seeing a Mac program
  574. written in C for the first time (all previous programs were pascal) and 
  575. thinking that it looke an awful lot like pascal, but much messier.
  576.  
  577. It's just as easy to access the macs toolbox routines from pascal as it is in
  578. C, so it really is a mater of preference.  And it is a matter of how well the
  579. language reflects the problem domain.  I personally don't like C because it
  580. forces me to deal with low level things that I at times don't really need to
  581. know.  It is also really hard for the programmer to benefit from information
  582. hiding since C doesn't help with this.
  583.  
  584. Rui
  585.  
  586.  
  587.  
  588. - -------------------------
  589.  
  590. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  591. Subject:  Mac Pascal vs. C
  592. Date: 4 Feb 92 10:53:24 +1300
  593. Organization: University of Waikato, Hamilton, New Zealand
  594.  
  595. Here's the answer to the debate:
  596.  
  597.     Use Modula-2!
  598.  
  599. Advantages over both Pascal and C:
  600.  
  601. * True separate compilation with scope control (the biggest plus, in my view)
  602. * Better control constructs
  603. * Somewhat improved types (opaque types, unsigned integer, environment queries)
  604.   over Pascal, no comparison with C
  605.  
  606. Disadvantages:
  607.  
  608. * Case-sensitive (I hate this)
  609. * Preserves some well-known Pascal pitfalls intact (e g the well-known VAR
  610.   argument problem)
  611.  
  612. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  613. Computer Services Dept                     fax: +64-7-838-4066
  614. University of Waikato            electric mail: ldo@waikato.ac.nz
  615. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  616. To someone with a hammer and a screwdriver, every problem looks
  617. like a nail with threads.
  618.  
  619.  
  620.  
  621. - -------------------------
  622.  
  623. From: greeny@top.cis.syr.edu (Jonathan Greenfield)
  624. Subject:  Mac Pascal vs. C
  625. Organization: CIS Dept., Syracuse University
  626. Date: Mon, 3 Feb 92 22:49:57 EST
  627.  
  628. In article <1992Feb4.105324.6417@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  629. >Here's the answer to the debate:
  630. >
  631. >    Use Modula-2!
  632. >
  633. >Disadvantages:
  634. >
  635. >* Case-sensitive (I hate this)
  636.  
  637. Don't most implementations have the ability to turn off case-sensitivity?
  638.  
  639. --
  640. greeny                                           greeny@top.cis.syr.edu
  641.  
  642. "What's the difference between an orange?"
  643.  
  644.  
  645.  
  646. - -------------------------
  647.  
  648. From: Carl.Constantine@BCSystems.GOV.BC.CA
  649. Subject:  Mac Pascal vs. C
  650. Date: 3 Feb 92 23:57:32 GMT
  651. Organization: BC Systems Corporation
  652.  
  653. In article <4042@se7.cs.nps.navy.mil>, rdixon@taurus.cs.nps.navy.mil (robert dixon) writes:
  654. > In article <PETE.92Feb1124152@medea.rice.edu> pete@medea.rice.edu (Louis Wu) writes:
  655. >>
  656. >>I couldn't let this pass.
  657. >>>> 
  658. >>Arrgh. You say the Think Pascal compiler is so good, ever looked at Think's
  659. >>C compiler? Strangely enough, they are similar...
  660. >>
  661. >>Pascal is for beginners, C is for real programmers, and assembly is for
  662. >>masochists. Surely nothing could be more clear.
  663. >>
  664. >>:-)
  665. >>--
  666. >   See, I said this question would start a fight.
  667.  
  668. I must say that I own both THINK Pascal 4.0.1 and THINK C 5.0.2 and I'm very
  669. impressed by both.  Pascal is mainly taught in schools (Grade 11 & 12) and in
  670. first year university (up here in Canada anyway), therefore you can indeed come
  671. to the assumption that "Pascal is for beginners".
  672.  
  673. I'm trying to learn C because it seems to be the way to go, along with OOP.  I
  674. just purchased a book by Thom Hogan and Kurt Mathies called "Macintosh C
  675. Programming By Example" which I'm finding very good. (It's published by
  676. Microsft Press for those that are interested).  I also have the Macintosh C
  677. primmer vols. 1 & 2.  I am desperately trying to learn C in my spare time.
  678.  
  679. I think both languages have their strong points and not so strong points, but I
  680. do believe that the THINK environment for C & Pascal is the BEST ON THE
  681. MARKET, especially for beginners in _both_ languages!!!!!
  682.  
  683.  
  684. >   How "object-oriented" is Think C?  Does it support classes?
  685. > Inheritance?  Function name overloading?  Public and private variables
  686. > and functions?  How about reference variables?
  687. In a word: yes!! (this applies to both Pascal and C [as far as I know] )
  688.  
  689. -- 
  690. Carl.Constantine@BCSystems.gov.bc.ca
  691. British Columbia, Canada
  692.  
  693.  
  694.  
  695. - -------------------------
  696.  
  697. From: mxmora@unix.SRI.COM (Matt Mora)
  698. Subject:  Mac Pascal vs. C
  699. Date: 4 Feb 92 16:34:44 GMT
  700. Organization: SRI International, Menlo Park, CA
  701.  
  702. In article <PETE.92Feb1124152@medea.rice.edu> pete@medea.rice.edu (Louis Wu) writes:
  703.  
  704. >Arrgh. You say the Think Pascal compiler is so good, ever looked at Think's
  705. >C compiler? Strangely enough, they are similar...
  706.  
  707. No way! THINK Pascal environment is much better. It has the best debugger
  708. around. I wish that Symantec would combine the two into one product since
  709. the editors and the project handling seem to be equivelent.
  710.  
  711.  
  712. -- 
  713. ___________________________________________________________
  714. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  715. SRI International           |  my unix  mxmora@unix.sri.com
  716. ___________________________________________________________
  717.  
  718.  
  719.  
  720. - -------------------------
  721.  
  722. From: francis@dogwood.atl.ga.us (John Stracke)
  723. Subject:  Mac Pascal vs. C
  724. Date: 4 Feb 92 19:45:36 GMT
  725. Organization: National Science Center Foundation
  726.  
  727. In article <PETE.92Feb1124152@medea.rice.edu> pete@medea.rice.edu (Louis Wu) writes:
  728.  
  729. >Organization: Whatsamatta U
  730.  
  731. Again? :-)
  732.  
  733. >>   1. Inside Macintosh was written in Pascal.
  734. >So what. Any pascal var parameter is a pointer in C. It's *very*
  735. >straightforward to call pascal routine routines from C.
  736.  
  737. IM being written in Pascal is actually a problem.  All those places
  738. where they have array[0..0] of X just freak Pascal out.
  739.  
  740. Still, it's nice to be able to look at exactly what you need.
  741.  
  742. >>   2. Pascal forces you to declare EVERYTHING, encouraging good
  743. >> programming vs. hacks (though you can hack in either...)
  744. >Key word being 'force'. C allows you to declare prototypes if you want.
  745.  
  746. Quite true.  I've noticed that I've become much more hackerly since
  747. abandoning Pascal.
  748.  
  749. >Pascal is for beginners, C is for real programmers, and assembly is for
  750. >masochists. Surely nothing could be more clear.
  751.  
  752. And where do things like Lisp fit in your scheme?
  753.  
  754. /===========================================================================\
  755. |John (Francis) Stracke         |My opinions are my own.                    |
  756. |Natl. Science Center Foundation|===========================================|
  757. |Augusta, GA                    |This is the .sig that says...              |
  758. |francis@dogwood.atl.ga.us      |        Ni!                                |
  759. \===========================================================================/
  760. (Formerly francis@zaphod.uchicago.edu)
  761. --
  762. -- 
  763.  
  764.  
  765.  
  766. - -------------------------
  767.  
  768. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  769. Subject:  Mac Pascal vs. C
  770. Date: 4 Feb 92 22:50:33 GMT
  771. Organization: University of Illinois at Urbana-Champaign
  772.  
  773. ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  774. >    Use Modula-2!
  775. >Advantages over both Pascal and C:
  776. >* Better control constructs
  777.  
  778. Debatable.  Matter of taste.
  779.  
  780. >Disadvantages:
  781.  
  782. * No variable-length argument lists.  Not even in built-ins (ie, no
  783.   equivalent to Pascal's WRITE).
  784.  
  785. Or has Modula-2 been extended since the original Wirth book?
  786. -- 
  787. Steve Dorner, U of Illinois Computing Services Office
  788. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  789. Apparently-To: does more harm than good.
  790.  
  791.  
  792.  
  793. - -------------------------
  794.  
  795. From: quinn@cs.uwa.oz.au (Quinn "The Eskimo!")
  796. Subject:  Mac Pascal vs. C
  797. Organization: The University of Western Australia
  798. Date: Wed, 5 Feb 1992 00:59:59 GMT
  799.  
  800. In article <1992Feb3.224957.17385@newstand.syr.edu>, greeny@top.cis.syr.edu (Jonathan Greenfield) writes:
  801. > In article <1992Feb4.105324.6417@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  802. > >
  803. > >* Case-sensitive (I hate this)
  804. > Don't most implementations have the ability to turn off case-sensitivity?
  805.  
  806. Tell that to the people at Metrowerks.  I mailed them specifically (they
  807. replied which was nice) to ask "Is there any change of having a switch
  808. to turn off case sensitivity /especially on keywords/?" and they mailed
  809. back saying there was:
  810.   a) no switch and no plan to put one in
  811.   b) an MPW tool to uppercase keywords in Modula 2 source
  812. A tool is not an ideal solution because it's too damned slow.
  813.  
  814. Quinn "The Eskimo!"   (quinn@cs.uwa.oz.au)   "Real Coke, Diet .sig"
  815. Department of Computer Science, The University of Western Australia
  816. -- One of the world's many case frustrated Modula 2 programmers!
  817.  
  818.  
  819.  
  820.  
  821. - -------------------------
  822.  
  823. From: greeny@top.cis.syr.edu (Jonathan Greenfield)
  824. Subject:  Mac Pascal vs. C
  825. Date: 5 Feb 92 02:21:34 GMT
  826. Organization: CIS Dept., Syracuse University
  827.  
  828. In article <1992Feb4.225033.6178@ux1.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
  829. >
  830. >>Disadvantages:
  831. >
  832. >* No variable-length argument lists.  Not even in built-ins (ie, no
  833. >  equivalent to Pascal's WRITE).
  834. >
  835. >Or has Modula-2 been extended since the original Wirth book?
  836.  
  837. You're missing the point though.  First of all, the IO procedures, etc, are
  838. *not* built-ins in Modula-2.  They are contained in standard libraries that
  839. are separate from the compiler (or should be, in any proper implementation).
  840. Secondly, it is quite ugly to provide standard "procedures" that violate
  841. the language's own rules for procedures.  Pascal's standard IO procedures
  842. are lousy in this regard.
  843.  
  844. In other words, the language should either allow ALL procedures to have
  845. variable-length parameter lists, or it should not allow ANY to have such
  846. parameter lists.
  847.  
  848. --
  849. greeny                                           greeny@top.cis.syr.edu
  850.  
  851. "What's the difference between an orange?"
  852.  
  853.  
  854.  
  855. - -------------------------
  856.  
  857. From: Thad.Humphries@p950.f70.n109.z1.FidoNet.Org (Thad Humphries)
  858. Subject:  Mac Pascal vs. C
  859. Date: 4 Feb 92 11:34:19 GMT
  860.  
  861.  
  862.  &W>    Public and private variables and functions?
  863.  &W> 
  864.  &W> No.
  865.  
  866. No by my reading of the THINK 5.0 OOP manual.  The method declaration looks like C++.
  867.  
  868.  * Origin: Quis custodiet ipsos custodes? (1:109/70.950)
  869.  
  870.  
  871.  
  872. - -------------------------
  873.  
  874. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  875. Subject:  Mac Pascal vs. C
  876. Date: 5 Feb 92 15:52:43 GMT
  877. Organization: Integrated Systems Laboratory, ETH, Zurich
  878.  
  879. In article <1992Feb4.225033.6178@ux1.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes:
  880. >ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  881. >>    Use Modula-2!
  882. >>Advantages over both Pascal and C:
  883. >>* Better control constructs
  884. >
  885. >Debatable.  Matter of taste.
  886. >
  887. >>Disadvantages:
  888. >
  889. >* No variable-length argument lists.  Not even in built-ins (ie, no
  890. >  equivalent to Pascal's WRITE).
  891.  
  892. I actually once saw a version of MODULA-2 which had variable argument lists (to
  893. make it interface to C libraries, it ran on a SUN).
  894.  
  895. >Or has Modula-2 been extended since the original Wirth book?
  896.  
  897. It has been revised in various ways. Mostly, it has been restricted, but there
  898. are 3 or 4 editions of the Modula book and at least as many different compilers
  899. from ETH only. And I hear there is currently a standard being prepared.
  900.  
  901. Matthias
  902.  
  903. - ---
  904. Matthias Neeracher                                   neeri@iis.ethz.ch
  905.    "There once was an Age of Reason, but we've progressed beyond it."
  906.                                    -- Ayn Rand, _Atlas Shrugged_
  907.  
  908.  
  909.  
  910. - -------------------------
  911.  
  912. From: rdixon@gemini.cs.nps.navy.mil (robert dixon)
  913. Subject:  Mac Pascal vs. C
  914. Date: 5 Feb 92 15:28:44 GMT
  915. Organization: Naval Postgraduate School, Monterey CA
  916.  
  917. In article <frain.697106821@depot.cis.ksu.edu> frain@cis.ksu.edu (Jerry Frain) writes:
  918. >If you like nice environments to program under try Emacs and C on a
  919. >Unix system.  Now, there's an unbeatable combination.
  920. >
  921.  
  922.  I never thought I'd see emacs mentioned in a Mac newsgroup. I use
  923. emacs about every day, but if I take more than about two weeks off, I
  924. forget about half the keystrokes (let's see . . . esc-w copies, or
  925. does it cut, or is it ctrl-w . . .)
  926.  
  927. - -------------------------------------------------------------------
  928. Bob Dixon                          "My opinions may not necessarily
  929. Low-Life Grad Student,              be my own . . ."
  930. Naval Postgraduate School,
  931. Monterey, CA                        rdixon@cs.nps.navy.mil
  932. - ---------------------------------------------------------------------
  933.  
  934.  
  935.  
  936. - -------------------------
  937.  
  938. From: ksand@apple.com (Kent Sandvik)
  939. Subject:  Mac Pascal vs. C
  940. Date: 6 Feb 92 17:44:29 GMT
  941. Organization: MacDTS Mongols
  942.  
  943. In article <697150826.1@blkcat.FidoNet>, Douglas.Hill@f438.n109.z1.FidoNet.Org (Douglas Hill) writes:
  944. > Here's one:  Has anyone heard about MacApp's support for AppleEvents?
  945. > Specifically I heard recently that MacApp won't be supporting the
  946. > Object Support Library.  Why?  I wonder if something else better is in
  947. > the works?
  948.  
  949. MacApp 3.0 supports core AppleEvents (you can't avoid using them) and 
  950. normal AEs using the TCommand structure. It will support the Object Model
  951. library in a future incarnation.
  952.  
  953. Kent Sandvik
  954.  
  955.  
  956.  
  957. - -------------------------
  958.  
  959. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  960. Subject:  Modula-2 (was Re: Mac Pascal vs. C)
  961. Date: 7 Feb 92 11:05:47 +1300
  962. Organization: University of Waikato, Hamilton, New Zealand
  963.  
  964. Hmm, the first point I made in my original follow-up seems to have got
  965. lost in all the noise, so I guess I should make it again. :-)
  966.  
  967. #1 primary absolutely the best advantage of Modula-2 over both Pascal and C:
  968. True separate compilation with scope control, and information hiding.
  969.  
  970. This means that you can split your code into separate modules, and
  971. control precisely what parts of each module are visible to other modules.
  972. And you can do this without sacrificing type-safeness.
  973.             ---------------------------------
  974.  
  975. Compare C, which only has 1950's FORTRAN-style "independent" compilation--you
  976. can declare things "extern", but there's no check that your external
  977. declaration matches the way the entity is actually implemented. And to avoid
  978. repeating extern declarations everywhere, you've got this "#include" kludge,
  979. with other kludges stacked upon it to get around a) multiple inclusions and
  980. b) the slowness of recompiling all that source over and over.
  981.  
  982. Pascal--or at least its UCSD derivatives--has "Units", which don't suffer
  983. from C's drawbacks, but don't give you the control over potential name-space
  984. clashes that you get with Modula-2. Also, Modula-2's compilation units are
  985. split into separate "definition" and "implementation" parts; this means that
  986. you can change the way some service is implemented, and provided the user-
  987. visible semantics (and call interface) hasn't changed, you only need to relink,
  988. not recompile, the client program. And the compiler still enforces its
  989. checks that the definition and implementation parts are consistent.
  990.  
  991. You can do information hiding without splitting your program into multiple
  992. files, too, by having modules within modules.
  993.  
  994. And remember, all this is done with absolutely *zero* run-time overhead--
  995. no method tables or run-time representation of object types. It's a set of high-
  996. level abstractions which map straight onto a von-Neumann machine.
  997.  
  998. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  999. Computer Services Dept                     fax: +64-7-838-4066
  1000. University of Waikato            electric mail: ldo@waikato.ac.nz
  1001. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  1002. This line intentionally left unfunny.
  1003.  
  1004.  
  1005.  
  1006. - -------------------------
  1007.  
  1008. From: quinn@cs.uwa.oz.au (Quinn "The Eskimo!")
  1009. Subject:  Mac Pascal vs. C
  1010. Organization: The University of Western Australia
  1011. Date: Wed, 5 Feb 1992 00:59:59 GMT
  1012.  
  1013. In article <1992Feb3.224957.17385@newstand.syr.edu>, greeny@top.cis.syr.edu (Jonathan Greenfield) writes:
  1014. > In article <1992Feb4.105324.6417@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  1015. > >
  1016. > >* Case-sensitive (I hate this)
  1017. > Don't most implementations have the ability to turn off case-sensitivity?
  1018.  
  1019. Tell that to the people at Metrowerks.  I mailed them specifically (they
  1020. replied which was nice) to ask "Is there any change of having a switch
  1021. to turn off case sensitivity /especially on keywords/?" and they mailed
  1022. back saying there was:
  1023.   a) no switch and no plan to put one in
  1024.   b) an MPW tool to uppercase keywords in Modula 2 source
  1025. A tool is not an ideal solution because it's too damned slow.
  1026.  
  1027. Quinn "The Eskimo!"   (quinn@cs.uwa.oz.au)   "Real Coke, Diet .sig"
  1028. Department of Computer Science, The University of Western Australia
  1029. -- One of the world's many case frustrated Modula 2 programmers!
  1030.  
  1031.  
  1032.  
  1033.  
  1034. - -------------------------
  1035.  
  1036. From: ozma@kuhub.cc.ukans.edu
  1037. Subject:  Mac Pascal vs. C
  1038. Date: 7 Feb 92 00:27:47 CST
  1039. Organization: University of Kansas Academic Computing Services
  1040.  
  1041.  
  1042. I've been attempting C for a month now (Pascal was all I did for many years). 
  1043. And one bit of code has annoyed me.  See what you think.
  1044.  
  1045. aShort = 5;
  1046. anotherShort = 2;
  1047. aDoubleVar = aShort / anotherShort;
  1048.  
  1049. I'm sure the C programmers see my annoyance right off.  I want to get 2.5, not
  1050. 2.  Since the operation (/) is being assigned to a double (or float I suppose
  1051. too), why not retain the fractional portion and do fractional division?  So I
  1052. do:
  1053.  
  1054. aDoubleVar = aShort;
  1055. aDoubleVar /= anotherShort;
  1056.  
  1057. Seems like a sloppy hack.  Is there a way to tell C how to do its divides?  In
  1058. Pascal / and div were very clear and very distinct.
  1059.  
  1060. john calhoun-
  1061.  
  1062.  
  1063.  
  1064.  
  1065. - -------------------------
  1066.  
  1067. From: jpurlia@qualcomm.com (John Purlia)
  1068. Subject:  Mac Pascal vs. C
  1069. Date: 7 Feb 92 20:35:54 GMT
  1070. Organization: Qualcomm, Inc., San Diego, CA
  1071.  
  1072. In article <1992Feb7.002748.37637@kuhub.cc.ukans.edu> 
  1073. ozma@kuhub.cc.ukans.edu writes:
  1074. > And one bit of code has annoyed me.  See what you think.
  1075. > aShort = 5;
  1076. > anotherShort = 2;
  1077. > aDoubleVar = aShort / anotherShort;
  1078. > 2.  Since the operation (/) is being assigned to a double (or float I 
  1079. suppose
  1080. > too), why not retain the fractional portion and do fractional division?  
  1081. So I
  1082. > do:
  1083. > aDoubleVar = aShort;
  1084. > aDoubleVar /= anotherShort;
  1085. > Seems like a sloppy hack.  Is there a way to tell C how to do its 
  1086. divides?  
  1087.  
  1088. Sure, just cast the operands like so:
  1089.  
  1090. aShort = 5;
  1091. anotherShort = 2;
  1092. aDoubleVar = (double) aShort / (double)anotherShort;
  1093.  
  1094. And that should do the trick for youI works for floats too!
  1095.  
  1096. ...........................................................................
  1097. John Purlia          : My brain; not my company's brain.  My brain says...
  1098. jpurlia@qualcomm.com :      "Just about any movie could be made better
  1099. AOL:  <Jpurlia>      :       if one of the characters were a vampire."
  1100. ...........................................................................
  1101.  
  1102.  
  1103.  
  1104. - -------------------------
  1105.  
  1106. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  1107. Subject:  Mac Pascal vs. C
  1108. Organization: Integrated Systems Laboratory, ETH, Zurich
  1109. Date: 8 Feb 92 01:08:17
  1110.  
  1111. In article <1992Feb7.002748.37637@kuhub.cc.ukans.edu> ozma@kuhub.cc.ukans.edu writes:
  1112. >I've been attempting C for a month now (Pascal was all I did for many years). 
  1113. >And one bit of code has annoyed me.  See what you think.
  1114. >
  1115. >aShort = 5;
  1116. >anotherShort = 2;
  1117. >aDoubleVar = aShort / anotherShort;
  1118. >
  1119. >I'm sure the C programmers see my annoyance right off.  I want to get 2.5, not
  1120. >2.  Since the operation (/) is being assigned to a double (or float I suppose
  1121. >too), why not retain the fractional portion and do fractional division?
  1122.  
  1123. Along this path lies madness. The current rules for expressions allow to parse
  1124. expressions completely bottom-up. If C would have to recognize that the result
  1125. will be assigned to a double, it would have to do much more complex parsing.
  1126.  
  1127. >So I do:
  1128. >
  1129. >aDoubleVar = aShort;
  1130. >aDoubleVar /= anotherShort;
  1131. >
  1132. >Seems like a sloppy hack.  Is there a way to tell C how to do its divides?
  1133.  
  1134. aDoubleVar = (double) aShort / (double) anotherShort;
  1135.  
  1136. >In Pascal / and div were very clear and very distinct.
  1137.  
  1138. In C, the casts are very clear and distinct. The thing that I blame C for, in
  1139. your example, is to fail silently. IMHO, C should have been designed to not
  1140. allow automatical promotion from integer to floating point.
  1141.  
  1142. Matthias
  1143.  
  1144. - ---
  1145. Matthias Neeracher                                      neeri@iis.ethz.ch
  1146.  `We say "gestalt" when things combine to act in ways we can't explain'
  1147.                              -- Marvin Minsky, _The Society Of Mind_
  1148.  
  1149.  
  1150.  
  1151. - -------------------------
  1152.  
  1153. From: molla@zeus.uucp (Levent Mollamustafaoglu)
  1154. Subject:  Mac Pascal vs. C
  1155. Date: 8 Feb 92 23:41:44 GMT
  1156. Organization: Aiken Computation Lab, Harvard University
  1157.  
  1158. In article <1992Feb7.002748.37637@kuhub.cc.ukans.edu> ozma@kuhub.cc.ukans.edu writes:
  1159. >
  1160. >I've been attempting C for a month now (Pascal was all I did for many years). 
  1161. >And one bit of code has annoyed me.  See what you think.
  1162. [description of problem about casting deleted]
  1163.  
  1164. Of course the best way is to use C++, and get automatic casting wrt
  1165. the constituents' types. :-)
  1166.  
  1167.  
  1168. ===========================================================================
  1169. Dr. Levent Mollamustafaoglu       Harvard University    
  1170. molla@paone.harvard.edu    molla@metatron.harvard.edu
  1171. ===========================================================================
  1172.  
  1173.  
  1174.  
  1175. - -------------------------
  1176.  
  1177. From: ksand@apple.com (Kent Sandvik)
  1178. Subject:  Mac Pascal vs. C
  1179. Date: 7 Feb 92 20:11:27 GMT
  1180. Organization: MacDTS Mongols
  1181.  
  1182. In article <FRANCIS.92Feb4144530@Galois.dogwood.atl.ga.us>, francis@dogwood.atl.ga.us (John Stracke) writes: 
  1183. > In article <PETE.92Feb1124152@medea.rice.edu> pete@medea.rice.edu (Louis Wu) writes:
  1184. > Quite true.  I've noticed that I've become much more hackerly since
  1185. > abandoning Pascal.
  1186.  
  1187. > >Pascal is for beginners, C is for real programmers, and assembly is for
  1188. > >masochists. Surely nothing could be more clear.
  1189.  
  1190. > And where do things like Lisp fit in your scheme?
  1191.  
  1192. Language wars are weird. It also seems that each new programmer generation
  1193. has their own favourite languages, as well as prejudices about other 
  1194. languages.
  1195.  
  1196. I usually take a pragmatic view to a particular use of a language, if
  1197. the language helps me with software engineering then it's the right tool,
  1198. despite the origin or my background with the language.
  1199.  
  1200. Back to the Macintosh programming front, there are languages that are 
  1201. suitable for Macintosh programming, and there are languages which might
  1202. become very useful in future. I don't see a difference between Pascal
  1203. and C use, and it really depends on the background whatever language
  1204. the developer might prefer.
  1205.  
  1206. Alas, the only problem is the hype-hysteria in the computer industry
  1207. today, managers are making decisions about language use by attending
  1208. conferences and market pressure, instead of using common sense and
  1209. engineering criterias.
  1210.  
  1211. Anyway, that about language wars.
  1212.  
  1213. Kent Sandvik
  1214. ..who really prefers Scheme, but I guess it will take some time before
  1215. this is a viable language solution in the commercial sector...
  1216.  
  1217.  
  1218.  
  1219. - -------------------------
  1220.  
  1221. From: ksand@apple.com (Kent Sandvik)
  1222. Subject:  Modula-2 (was Re: Mac Pascal vs. C)
  1223. Date: 9 Feb 92 04:45:03 GMT
  1224. Organization: MacDTS Mongols
  1225.  
  1226. In article <1992Feb7.110547.6454@waikato.ac.nz>, ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes: 
  1227. > Hmm, the first point I made in my original follow-up seems to have got
  1228. > lost in all the noise, so I guess I should make it again. :-)
  1229. > #1 primary absolutely the best advantage of Modula-2 over both Pascal and C:
  1230. > True separate compilation with scope control, and information hiding.
  1231.  
  1232. > This means that you can split your code into separate modules, and
  1233. > control precisely what parts of each module are visible to other modules.
  1234. > And you can do this without sacrificing type-safeness.
  1235.  
  1236. ahum, Common Lisp has packages, which is really a data structure that establishes
  1237. a mapping from print names to symbols. At any given time one package is current,
  1238. which the Lisp system is using in when it translates strings into symbols. 
  1239.  
  1240. Even better, CL has modules, which is a subsystem which is loaded from one
  1241. or *more* files. A module may or may not consist of one or several packages.
  1242.  
  1243. I think we agree that name space handling is very poor with C and C++, even
  1244. if data abstraction in forms of class scoping helps a little bit with C++.
  1245. But there's always the problem with class naming schemes, and I've even
  1246. seen serious suggestions that each future C++ class library vendor will
  1247. place a pre-index in front of the class name, as in TAppleString :-).
  1248.  
  1249. Kent Sandvik
  1250.  
  1251.  
  1252.  
  1253. - -------------------------
  1254.  
  1255. From: nagle@netcom.COM (John Nagle)
  1256. Subject:  Mac Pascal vs. C
  1257. Date: 9 Feb 92 17:46:54 GMT
  1258. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  1259.  
  1260. molla@zeus.uucp (Levent Mollamustafaoglu) writes:
  1261. >Of course the best way is to use C++, and get automatic casting wrt
  1262. >the constituents' types. :-)
  1263.  
  1264.       C++ has its own set of problems, of course.  Also, MPW C++ is two
  1265. generations behind the language spec, which calls for templates and exceptions.
  1266. Zortech C++ is defective (and maybe defunct; the expected Fall 91 release
  1267. still hasn't happened).  Think C is nonstandard.  So even if you like
  1268. C++, the tools are in bad shape.
  1269.  
  1270.       Yet there are few alternatives.  Plain C is obsolete given the direction
  1271. MacApp is going.  Pascal also seems to be a dead end.  Modula seems to
  1272. have peaked.  Eiffel is an academic toy.  Lisp and its dialects died with
  1273. AI.  Hypertalk is too slow.  Smalltalk is also too slow.  Basic is too tacky.
  1274. Ada is too expensive.
  1275.  
  1276.        The Xanadu crowd are writing in Smalltalk and machine-translating
  1277. to C++, with good results, but this technology isn't ready for prime time.
  1278.  
  1279.                     John Nagle
  1280.  
  1281.  
  1282.  
  1283. - -------------------------
  1284.  
  1285. From: re00+@andrew.cmu.edu (Robert H Earhart)
  1286. Subject:  Mac Pascal vs. C
  1287. Date: 9 Feb 92 20:26:33 GMT
  1288. Organization: Freshman, MCS general, Carnegie Mellon, Pittsburgh, PA
  1289.  
  1290.  
  1291.   Lisp? Dead? I beg your pardon... Macintosh Common Lisp is a wonderful
  1292. environment... and also required for a couple of computer science
  1293. classes here at CMU. :)
  1294.  
  1295.   -Rob
  1296.  
  1297.   (I still prefer Pascal. :)
  1298.  
  1299.  
  1300.  
  1301. - -------------------------
  1302.  
  1303. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1304. Subject:  Modula-2
  1305. Date: 9 Feb 92 22:07:54 GMT
  1306. Organization: University of Waikato, Hamilton, New Zealand
  1307.  
  1308. In article <20126@goofy.Apple.COM>, ksand@apple.com (Kent Sandvik) writes:
  1309.  
  1310. [in response to my description of name-space control in Modula-2]
  1311. > ahum, Common Lisp has packages, which is really a data structure that establishes
  1312. > a mapping from print names to symbols. At any given time one package is current,
  1313. > which the Lisp system is using in when it translates strings into symbols.
  1314. >
  1315. > Even better, CL has modules, which is a subsystem which is loaded from one
  1316. > or *more* files. A module may or may not consist of one or several packages.
  1317. >
  1318. > I think we agree that name space handling is very poor with C and C++, even
  1319. > if data abstraction in forms of class scoping helps a little bit with C++.
  1320.  
  1321. Wonderful, Kent, but you forgot the latter part of my posting, where I
  1322. pointed out that Modula-2 achieves what it does with no special run-time
  1323. requirements. Let's see, so far I've successfully written dozens of HyperCard
  1324. externals, a couple of FKEYs, an After Dark display, and a dcmd for MacsBug,
  1325. all using Modula-2. Try doing that with Common Lisp sometime :-).
  1326.  
  1327. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  1328. Computer Services Dept                     fax: +64-7-838-4066
  1329. University of Waikato            electric mail: ldo@waikato.ac.nz
  1330. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  1331. To someone with a hammer and a screwdriver, every problem looks
  1332. like a nail with threads.
  1333.  
  1334.  
  1335.  
  1336. - -------------------------
  1337.  
  1338. From: ksand@apple.com (Kent Sandvik)
  1339. Subject:  Modula-2
  1340. Date: 10 Feb 92 19:54:44 GMT
  1341. Organization: MacDTS Mongols
  1342.  
  1343. In article <1992Feb10.110754.6490@waikato.ac.nz>, ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  1344. > In article <20126@goofy.Apple.COM>, ksand@apple.com (Kent Sandvik) writes:
  1345. > [in response to my description of name-space control in Modula-2]
  1346. > > ahum, Common Lisp has packages, which is really a data structure that establishes
  1347. > > a mapping from print names to symbols. At any given time one package is current,
  1348. > > which the Lisp system is using in when it translates strings into symbols.
  1349. > >
  1350. > > Even better, CL has modules, which is a subsystem which is loaded from one
  1351. > > or *more* files. A module may or may not consist of one or several packages.
  1352. > >
  1353. > > I think we agree that name space handling is very poor with C and C++, even
  1354. > > if data abstraction in forms of class scoping helps a little bit with C++.
  1355. > Wonderful, Kent, but you forgot the latter part of my posting, where I
  1356. > pointed out that Modula-2 achieves what it does with no special run-time
  1357. > requirements. Let's see, so far I've successfully written dozens of HyperCard
  1358. > externals, a couple of FKEYs, an After Dark display, and a dcmd for MacsBug,
  1359. > all using Modula-2. Try doing that with Common Lisp sometime :-).
  1360.  
  1361. ..some day we will have hardware that will handle dynamic/reflective languages
  1362. performance wise well, some day... Anyway, I tried to point out the nice
  1363. things with Common Lisp module/package handling. Anyway, imagine writing
  1364. a dcmd in Lisp :-). Actually the whole debugging environment is maybe part of the
  1365. whole runtime, so you will write a generic function which will trigger the 'dcmd'
  1366. style function.
  1367.  
  1368. Kent
  1369.  
  1370.  
  1371.  
  1372. - -------------------------
  1373.  
  1374. From: ksand@apple.com (Kent Sandvik)
  1375. Subject:  Mac Pascal vs. C
  1376. Date: 10 Feb 92 19:59:38 GMT
  1377. Organization: MacDTS Mongols
  1378.  
  1379. In article <1992Feb09.174654.5825nagle@netcom.COM>, nagle@netcom.COM (John Nagle) writes:
  1380. >       C++ has its own set of problems, of course.  Also, MPW C++ is two
  1381. > generations behind the language spec, which calls for templates and exceptions.
  1382. > Zortech C++ is defective (and maybe defunct; the expected Fall 91 release
  1383. > still hasn't happened).  Think C is nonstandard.  So even if you like
  1384. > C++, the tools are in bad shape.
  1385.  
  1386. Most C++ compiler vendors don't have exception handling, including good old
  1387. Cfront 3.0 from AT&T. Ditto with templates, few compilers have this feature
  1388. today. It seems that people take ARM for granted, and assume that everything
  1389. described in ARM should work on every C++ compiler. Even Cfront doesn't
  1390. handle every ARM feature.
  1391.  
  1392. > Yet there are few alternatives.  Plain C is obsolete given the direction
  1393. > MacApp is going.  Pascal also seems to be a dead end.  Modula seems to
  1394. > have peaked.  Eiffel is an academic toy.  Lisp and its dialects died with
  1395. > AI.  Hypertalk is too slow.  Smalltalk is also too slow.  Basic is too tacky.
  1396. > Ada is too expensive.
  1397.  
  1398. I wonder what languages our successful Macintosh developers are using... :-).
  1399. Alas, C/C++ will be the grunt-language for personal computer software development
  1400. for the next 4-8 years.
  1401.  
  1402. Kent Sandvik/DTS
  1403.  
  1404.  
  1405.  
  1406. - -------------------------
  1407.  
  1408. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1409. Subject:  Modula-2
  1410. Date: 11 Feb 92 17:08:41 +1300
  1411. Organization: University of Waikato, Hamilton, New Zealand
  1412.  
  1413. In article <20168@goofy.Apple.COM>, ksand@apple.com (Kent Sandvik) writes:
  1414.  
  1415. > ..some day we will have hardware that will handle dynamic/reflective languages
  1416. > performance wise well, some day...
  1417.  
  1418. Sorry, Kent, but it's been tried, over and over. Remember the Burroughs
  1419. ALGOL machines, the Symbolics LISP machine, even the Intel 432 ... pushing
  1420. that sort of complexity into the hardware doesn't make it any more efficient.
  1421. And we haven't been making all these advances in RISC design only to throw it
  1422. all away at the software level.
  1423.  
  1424. No, I predict that, as programmers notice that some of these complex new tools
  1425. are actually slowing down their development efforts, there will be a
  1426. resurgence of the "Keep It Simple, Stupid!" school of programming language
  1427. design. And I think that Niklaus Wirth will be alive to see it.
  1428.  
  1429. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  1430. Computer Services Dept                     fax: +64-7-838-4066
  1431. University of Waikato            electric mail: ldo@waikato.ac.nz
  1432. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  1433. To someone with a hammer and a screwdriver, every problem looks
  1434. like a nail with threads.
  1435.  
  1436.  
  1437.  
  1438. - -------------------------
  1439.  
  1440. Subject:  Modula-2 (was Re: Mac Pascal vs. C)
  1441. From: Bruce.Hoult@actrix.gen.nz (Bruce Hoult)
  1442. Date: Tue, 11 Feb 1992 09:22:48 GMT
  1443. Organization: Actrix Information Exchange, Wellington, New Zealand
  1444.  
  1445. ldo@waikato.ac.nz (Lawrence D'Oliveiro) writes:
  1446.  
  1447. >You can do information hiding without splitting your program into multiple
  1448. >files, too, by having modules within modules.
  1449.  
  1450. Ditto for nested classes in C++.
  1451.  
  1452. >And remember, all this is done with absolutely *zero* run-time overhead--
  1453. >no method tables or run-time representation of object types. It's a set of
  1454. >high-level abstractions which map straight onto a von-Neumann machine.
  1455.  
  1456. Ditto for C++.  That "no method tables or run-time representation of
  1457. object types" bit is a red herring, since that is only present when you're
  1458. doing things that Modula-2 can't do at all (except by manually building
  1459. method tables using function pointers). 
  1460. -- 
  1461. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  1462. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  1463. "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
  1464. hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
  1465.  
  1466.  
  1467.  
  1468. - -------------------------
  1469.  
  1470. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  1471. Subject:  Modula-2
  1472. Organization: Kalamazoo College
  1473. Date: Tue, 11 Feb 1992 15:25:31 GMT
  1474.  
  1475. ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  1476. >
  1477. >And we haven't been making all these advances in RISC design only to throw it
  1478. >all away at the software level.
  1479.  
  1480. Here's a good place to point out that, in five years, the newest
  1481. computers will be running Macintosh code with software emulation of the
  1482. 680x0 chip.  The Toolbox, however, will be written in the processor's
  1483. native assembly language.
  1484.  
  1485. This means that all the "clever" techniques that bypass the toolbox with
  1486. carefully-unrolled cycle-pinching loops will be an order of magnitude
  1487. slower than the "stupid" programs that call the Toolbox.
  1488.  
  1489. Poetic justice or monstrous tragedy?  You decide.
  1490. -- 
  1491.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  1492.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.    
  1493.  
  1494.  
  1495.  
  1496. - -------------------------
  1497.  
  1498. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1499. Subject:  Modula-2 (was Re: Mac Pascal vs. C)
  1500. Date: 11 Feb 92 21:56:55 GMT
  1501. Organization: University of Waikato, Hamilton, New Zealand
  1502.  
  1503. In article <1992Feb11.092248.29167@actrix.gen.nz>, Bruce.Hoult@actrix.gen.nz
  1504. (Bruce Hoult) writes:
  1505. > ldo@waikato.ac.nz (Lawrence D'Oliveiro) writes:
  1506. >
  1507. >>You can do information hiding without splitting your program into multiple
  1508. >>files, too, by having modules within modules.
  1509. >
  1510. > Ditto for nested classes in C++.
  1511. >
  1512. >>And remember, all this is done with absolutely *zero* run-time overhead--
  1513. >>no method tables or run-time representation of object types. It's a set of
  1514. >>high-level abstractions which map straight onto a von-Neumann machine.
  1515. >
  1516. > Ditto for C++.  That "no method tables or run-time representation of
  1517. > object types" bit is a red herring, since that is only present when you're
  1518. > doing things that Modula-2 can't do at all (except by manually building
  1519. > method tables using function pointers).
  1520.  
  1521. In article <1992Feb7.110547.6454@waikato.ac.nz>, I said:
  1522.  
  1523. > #1 primary absolutely the best advantage of Modula-2 over both Pascal and C:
  1524. > True separate compilation with scope control, and information hiding.
  1525.  
  1526. So tell us: how good are the separate compilation facilities in C++?
  1527.  
  1528. I'll go home and get my "red herring" example as well, and see how well
  1529. you can handle that in C++...
  1530.  
  1531. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  1532. Computer Services Dept                     fax: +64-7-838-4066
  1533. University of Waikato            electric mail: ldo@waikato.ac.nz
  1534. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  1535.  
  1536.  
  1537.  
  1538. - -------------------------
  1539.  
  1540. From: plogan@mentorg.com (Patrick Logan)
  1541. Subject:  Modula-2
  1542. Organization: Mentor Graphics Corporation
  1543. Date: Tue, 11 Feb 1992 20:27:25 GMT
  1544.  
  1545. In article <1992Feb11.170841.6507@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  1546.    In article <20168@goofy.Apple.COM>, ksand@apple.com (Kent Sandvik) writes:
  1547.    > ..some day we will have hardware that will handle dynamic/reflective languages
  1548.    > performance wise well, some day...
  1549.  
  1550.    Sorry, Kent, but it's been tried, over and over. Remember the Burroughs
  1551.    ALGOL machines, the Symbolics LISP machine, even the Intel 432 ... pushing
  1552.    that sort of complexity into the hardware doesn't make it any more efficient.
  1553.    And we haven't been making all these advances in RISC design only to throw it
  1554.    all away at the software level.
  1555.  
  1556. Special purpose hardware is not needed. It has already been
  1557. demonstrated that a little cleverness in the compiler and run-time
  1558. system goes a long way. The hardware is nice, but not necessary.
  1559.  
  1560.    No, I predict that, as programmers notice that some of these complex new tools
  1561.    are actually slowing down their development efforts, there will be a
  1562.    resurgence of the "Keep It Simple, Stupid!" school of programming language
  1563.    design. And I think that Niklaus Wirth will be alive to see it.
  1564.  
  1565. The trend appears to be heading toward C++. The trend within the C++
  1566. world is towards the kinds of tools traditionally associated with LISP
  1567. and Smalltalk: browsers, graphers, interpreters, debuggers, even
  1568. automatic memory management. These things generally help and faster,
  1569. general-purpose hardware is only going to make them perform better,
  1570. continuing C++'s popularity.
  1571.  
  1572. In the long run, other languages and styles will survive. C++ will
  1573. eventually evolve or be replaced with something more effective. Let's
  1574. hope we'll all be alive to see it.
  1575. -- 
  1576. Patrick Logan, plogan@mentorg.com,
  1577. Voice: (503) 685-7000 x2907, FAX: (503) 685-1282
  1578. Mentor Graphics Corp., Bldg. C, 8005 SW Boeckman Rd., Wilsonville, OR 97070
  1579. I can't gete the .signature virus and I can't gete the .signature
  1580.  
  1581.  
  1582.  
  1583. - -------------------------
  1584.  
  1585. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1586. Subject:  Modula-2 (was Re: Mac Pascal vs. C)
  1587. Date: 12 Feb 92 20:53:08 GMT
  1588. Organization: University of Waikato, Hamilton, New Zealand
  1589.  
  1590. In article <1992Feb11.092248.29167@actrix.gen.nz>, Bruce.Hoult@actrix.gen.nz
  1591. (Bruce Hoult) wrote:
  1592. > That "no method tables or run-time representation of object types" bit
  1593. > is a red herring...
  1594.  
  1595. In article <1992Feb12.105655.6514@waikato.ac.nz>, I said:
  1596. > I'll go home and get my "red herring" example as well...
  1597.  
  1598. On second thoughts, I won't. I was rather hoping to conduct this discussion
  1599. on a courteous, civilized level. And I still would like to. But I'm not
  1600. prepared to put up with comments like that.
  1601.  
  1602. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  1603. Computer Services Dept                     fax: +64-7-838-4066
  1604. University of Waikato            electric mail: ldo@waikato.ac.nz
  1605. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  1606.  
  1607.  
  1608.  
  1609. - -------------------------
  1610.  
  1611. From: ian@syacus.acus.oz.au (Ian Joyner)
  1612. Subject:  Mac Pascal vs. C
  1613. Organization: ACUS Australian Centre for Unisys Software, Sydney
  1614. Date: Wed, 12 Feb 1992 00:58:08 GMT
  1615.  
  1616. someone writes:
  1617. >> Yet there are few alternatives.  Plain C is obsolete given the direction
  1618. >> MacApp is going.  Pascal also seems to be a dead end.  Modula seems to
  1619. >> have peaked.  Eiffel is an academic toy.  Lisp and its dialects died with
  1620. >> AI.  Hypertalk is too slow.  Smalltalk is also too slow.  Basic is too tacky.
  1621. >> Ada is too expensive.
  1622.  
  1623. Whoever you are, I suggest you get your facts straight before making such
  1624. silly prejudicial remarks. Often you will find that the world is
  1625. different to the way you condemn it to be in your own head.
  1626. -- 
  1627. Ian Joyner                                     ACSNet: ian@syacus.acus.oz
  1628. ACUS (Australian Centre for Unisys Software)   Internet: ian@syacus.acus.oz.au
  1629. Tel 61-2-390 1328      Fax 61-2-390 1391       UUCP: ...uunet!munnari!syacus.oz
  1630.  
  1631.  
  1632.  
  1633. - -------------------------
  1634.  
  1635. From: bkottmann@falcon.aamrl.wpafb.af.mil (Brett Kottmann)
  1636. Subject: C and function overloading (was Re: Mac Pascal vs. C)
  1637. Date: 12 Feb 92 13:27:37 EST
  1638. Organization: Logicon Technical Services, Inc.
  1639.  
  1640. In article <NEERI.92Feb8010817@iis.ethz.ch>, neeri@iis.ethz.ch (Matthias Ulrich Neeracher) writes:
  1641. > In article <1992Feb7.002748.37637@kuhub.cc.ukans.edu> ozma@kuhub.cc.ukans.edu writes:
  1642. >>I've been attempting C for a month now (Pascal was all I did for many years). 
  1643. >>And one bit of code has annoyed me.  See what you think.
  1644. >>
  1645. >>aShort = 5;
  1646. >>anotherShort = 2;
  1647. >>aDoubleVar = aShort / anotherShort;
  1648. >>
  1649. >>I'm sure the C programmers see my annoyance right off.  I want to get 2.5, not
  1650.  
  1651.     Well, how about misunderstaning of what C is and does...?
  1652.  
  1653. >... 
  1654. > In C, the casts are very clear and distinct. The thing that I blame C for, in
  1655. > your example, is to fail silently. IMHO, C should have been designed to not
  1656. > allow automatical promotion from integer to floating point.
  1657.  
  1658.     What C does is use / to mean differnent things with different
  1659. operators.  It mean integer division when using integers, complex division when
  1660. using reals.
  1661.  
  1662.     Once you've written a program in C using real numbers, you remember
  1663. this for life... :)
  1664.  
  1665.     It really is a feature, and not something to raise informational
  1666. messages.  You have to assume a competent programmer.  Although there could
  1667. always be a -novice switch for the compiler. :)
  1668.  
  1669. Brett
  1670. =============================OFFICIAL=DISCLAIMER================================
  1671. The opinions and views expressed here are strictly my own and do not 
  1672. necessarily reflect the official position of either the U.S. Air Force 
  1673. or its contractors.
  1674. =====================DO=NOT=REMOVE=TAG=UNDER=PENALTY=OF=LAW===:)================
  1675.  
  1676.  
  1677.  
  1678. - -------------------------
  1679.  
  1680. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1681. Subject:  Modula-2
  1682. Date: 13 Feb 92 05:01:26 GMT
  1683. Organization: University of Waikato, Hamilton, New Zealand
  1684.  
  1685. In article <1992Feb11.152531.2650@hobbes.kzoo.edu>, k044477@hobbes.kzoo.edu
  1686. (Jamie R. McCarthy) writes:
  1687. > Here's a good place to point out that, in five years, the newest
  1688. > computers will be running Macintosh code with software emulation of the
  1689. > 680x0 chip.  The Toolbox, however, will be written in the processor's
  1690. > native assembly language.
  1691. >
  1692. > This means that all the "clever" techniques that bypass the toolbox with
  1693. > carefully-unrolled cycle-pinching loops will be an order of magnitude
  1694. > slower than the "stupid" programs that call the Toolbox.
  1695. >
  1696. > Poetic justice or monstrous tragedy?  You decide.
  1697.  
  1698. How about "business opportunity"? :-)
  1699.  
  1700. Five years is a long time; long enough to make a tidy fortune selling
  1701. a neato program that runs fast on today's machines at least partly because
  1702. of cycle-pinching toolbox-bypassing techniques. Then when the new machines
  1703. come out, you'll have enough of a financial base to develop the new, even
  1704. faster version, and charge everybody a nice fee to upgrade.
  1705.  
  1706. Lawrence "I work at a university; what do *I* know about
  1707. business opportunities?" D'Oliveiro
  1708.  
  1709.  
  1710.  
  1711. - -------------------------
  1712.  
  1713. From: Bruce.Hoult@actrix.gen.nz (Bruce Hoult)
  1714. Subject:  Modula-2 (was Re: Mac Pascal vs. C)
  1715. Date: 13 Feb 92 02:03:35 GMT
  1716. Organization: Actrix Information Exchange, Wellington, New Zealand
  1717.  
  1718. ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  1719. >In article <1992Feb7.110547.6454@waikato.ac.nz>, I said:
  1720. > #1 primary absolutely the best advantage of Modula-2 over both Pascal and C:
  1721. > True separate compilation with scope control, and information hiding.
  1722. >So tell us: how good are the separate compilation facilities in C++?
  1723.  
  1724. In theory, lousy.  In practice, workable (just) but lousy.
  1725.  
  1726. Modula-2 and Ada certainly have better control over the scope of names
  1727. with the "IMPORT foo" and "FROM foo IMPORT bar" idea, but the ANSI C++
  1728. committee are studying several proposals to do the same type of thing
  1729. with classes in C++.
  1730.  
  1731. Here's a message from BIX from earlier today -- personally I think the
  1732. suggested syntax is an ugly as hell, but it does illustrate that the
  1733. problem is known and is being worked on.
  1734.  
  1735. ==========
  1736. c.plus.plus/x3j16 #173, from bstroustrup, 1112 chars, Wed Feb 12 13:25:25 1992
  1737. Comment to 171. Comment(s). 
  1738. - --------
  1739.  > Perhaps.  And we can probably kill .h files and consider some
  1740.  > issues for a C++ environment issues at the same time.
  1741.  
  1742. I very much doubt it. Anything powerful enough to make .h files redundant would
  1743. also be complicated and controversial. We would also have to keep .h files for
  1744. compatibility anyway.
  1745.  
  1746. My thoughts on name space pollution issues is more along the lines of actually
  1747. making .h filesmore useful as interface definitions. 
  1748.  
  1749. Here is one of several ideas being discussed in the extensions working group:
  1750.  
  1751.     :: ATT :: {
  1752.         // ...
  1753.         void f();
  1754.         void g();
  1755.     }
  1756.  
  1757. This defines a name space ATT. Including this text would let you use the
  1758. names from the ATT ``pseudo-global'' scope unqualified:
  1759.  
  1760.         f();
  1761.         g();
  1762.  
  1763. However if you also included another such scope, say 
  1764.  
  1765.     :: MS :: {
  1766.         int f();
  1767.         void h();
  1768.     }
  1769.  
  1770. then
  1771.     f();
  1772. becomes ambiguous and you'll have to qualify it
  1773.  
  1774.     int i = MS::f();
  1775.     ATT::f();
  1776.  
  1777. names that doesn't clash would not need qualification:
  1778.  
  1779.     g();    // meaning ATT::g()
  1780.     h();    // meaning MS::h().
  1781.  
  1782. Please note that this all have to be looked into in great detail before
  1783. it is ready for anything but debate.
  1784.  
  1785. - ---------
  1786.  
  1787. >I'll go home and get my "red herring" example as well, and see how well
  1788. >you can handle that in C++...
  1789.  
  1790. I look forward to the challenge..  :-)
  1791.  
  1792.  
  1793. -- 
  1794. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  1795. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  1796. "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
  1797. hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
  1798.  
  1799.  
  1800.  
  1801. - -------------------------
  1802.  
  1803. From: Bruce.Hoult@bbs.actrix.gen.nz
  1804. Subject:  Modula-2 (was Re: Mac Pascal vs. C)
  1805. Date: 14 Feb 92 03:02:19 GMT
  1806. Organization: Actrix Information Exchange
  1807.  
  1808. In article <1992Feb13.095309.6528@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  1809. > In article <1992Feb11.092248.29167@actrix.gen.nz>, Bruce.Hoult@actrix.gen.nz
  1810. > (Bruce Hoult) wrote:
  1811. > > That "no method tables or run-time representation of object types" bit
  1812. > > is a red herring...
  1813. > In article <1992Feb12.105655.6514@waikato.ac.nz>, I said:
  1814. > > I'll go home and get my "red herring" example as well...
  1815. > On second thoughts, I won't. I was rather hoping to conduct this discussion
  1816. > on a courteous, civilized level. And I still would like to. But I'm not
  1817. > prepared to put up with comments like that.
  1818.  
  1819. Huh?  What did I say?  I'm sorry if I've somehow unwittingly offended you,
  1820. but all I was saying is that there isn't anything in Modula-2 that requires
  1821. method tables or run-time representation of object types when implemented
  1822. in C++.  There are things that are *better* implemented that way, but you
  1823. always have the option of using exactly the same tools as you would in M2.
  1824.  
  1825. -- 
  1826. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  1827. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  1828. "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
  1829. hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
  1830.  
  1831.  
  1832.  
  1833. - -------------------------
  1834.  
  1835. From: ksand@apple.com (Kent Sandvik)
  1836. Subject:  Modula-2
  1837. Date: 14 Feb 92 05:53:19 GMT
  1838. Organization: MacDTS Mongols
  1839.  
  1840. In article <1992Feb11.170841.6507@waikato.ac.nz>, ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  1841. > In article <20168@goofy.Apple.COM>, ksand@apple.com (Kent Sandvik) writes:
  1842. > > ..some day we will have hardware that will handle dynamic/reflective languages
  1843. > > performance wise well, some day...
  1844.  
  1845. > Sorry, Kent, but it's been tried, over and over. Remember the Burroughs
  1846. > ALGOL machines, the Symbolics LISP machine, even the Intel 432 ... pushing
  1847. > that sort of complexity into the hardware doesn't make it any more efficient.
  1848. > And we haven't been making all these advances in RISC design only to throw it
  1849. > all away at the software level.
  1850.  
  1851. Don't mention the Bu** word for me (former Sperry person who left the company
  1852. after the invasion :-) ).
  1853.  
  1854. I'm not talking about the issue of big mainframe or specialized high end
  1855. workstations tuned for *one* particular language (ALGOL and B-/A-series from B***,
  1856. Symbolics and TI Explorers for LISP). I'm personally looking at all these
  1857. new cute consumer electronics boxes from Japan that have their own small
  1858. cute OS systems which handle their memory management quite well. Ever heard
  1859. about a Sharp time management assistant that gets a bomb box? In these 
  1860. cases memory management handling is of utmost importance, we can't expect
  1861. a Sharp use increase the heap space...
  1862.  
  1863. > No, I predict that, as programmers notice that some of these complex new tools
  1864. > are actually slowing down their development efforts, there will be a
  1865. > resurgence of the "Keep It Simple, Stupid!" school of programming language
  1866. > design. And I think that Niklaus Wirth will be alive to see it.
  1867.  
  1868. Yes, I also subscribe to the notion of "Reduced Feature Programming Languages",
  1869. Scheme is one example of such language design. C *was* such a language. But as
  1870. with the case of RISC, where compilers produce optimal code for reduced instruction
  1871. sets, we need hardware that handles memory management in collaboration with the
  1872. language. This is the reason I do believe that the merge of consumer electronics
  1873. and computers will produce new languages and operating systems which work together
  1874. with hardware, and where for instance the handling of memory is far more transparent
  1875. than it is today in the world of mallocs and NewHandles.
  1876.  
  1877. Kent Sandvik
  1878. - -
  1879. Not speaking for any special company
  1880.  
  1881.  
  1882.  
  1883. - -------------------------
  1884.  
  1885. From: ksand@apple.com (Kent Sandvik)
  1886. Subject:  Modula-2 (was Re: Mac Pascal vs. C)
  1887. Date: 13 Feb 92 20:38:06 GMT
  1888. Organization: MacDTS Mongols
  1889.  
  1890. In article <1992Feb11.092248.29167@actrix.gen.nz>, Bruce.Hoult@actrix.gen.nz (Bruce Hoult) writes:
  1891. > ldo@waikato.ac.nz (Lawrence D'Oliveiro) writes:
  1892. > >You can do information hiding without splitting your program into multiple
  1893. > >files, too, by having modules within modules.
  1894. >  
  1895. > Ditto for nested classes in C++.
  1896. > >And remember, all this is done with absolutely *zero* run-time overhead--
  1897. > >no method tables or run-time representation of object types. It's a set of
  1898. > >high-level abstractions which map straight onto a von-Neumann machine.
  1899. > Ditto for C++.  That "no method tables or run-time representation of
  1900. > object types" bit is a red herring, since that is only present when you're
  1901. > doing things that Modula-2 can't do at all (except by manually building
  1902. > method tables using function pointers). 
  1903.  
  1904. Modula-2/C++/Lisp bashing on comp.sys.mac.programmer :-). Anyway, I've used
  1905. C++ for a long time, and it always beats me why we are stuck to a file-level
  1906. type coercion of type information and labels. Certainly module use is a better
  1907. way to restrict, load and control class definitions. Nested classes in C++
  1908. is just an attempt to push the problem down to class level, and doesn't solve
  1909. the problem with class naming clashes.
  1910.  
  1911. With the future development environments based on a database (type the Lucid 
  1912. C++ dev. environment) the use of name scoping is resolved by the underlying 
  1913. object/source code database. So in that sense the problem might suddenly go away.
  1914.  
  1915. Kent Sandvik/DTS
  1916.  
  1917.  
  1918.  
  1919. ---------------------------
  1920.  
  1921. End of C.S.M.P. Digest
  1922. **********************
  1923.